import { useDrag } from "react-dnd";
export interface MaterialitemProps {
    name: string;
}

function Materialitem(props: MaterialitemProps) {
    const [_, dragRef] = useDrag({
        type: props.name,
        item: {
            type: props.name,
        }
    })


    return (
        <div
            ref={dragRef}
            className="border-dashed 
            border-[1px] border-[#000] 
            py-[8px] px-[10px] 
            inline-block
            bg-white 
            m-[10px]
            hover:bg-[#ccc] hover:text-white"
        >
            {props.name}
        </div>
    )

}
export default Materialitem;